<template>
  <div>
    <div class="header">
      <div class="header-left">
        <div class="iconfont">&#xe623;</div>
      </div>
      <div class="header-input">
        <span class="iconfont">&#xe63c;</span>
        输入城市/景点/游玩主题
      </div>
      <router-link to="/city">
        <div class="header-right">
          {{ this.city }}
          <span class="iconfont">&#xe662;</span>
        </div>
      </router-link>
    </div>
  </div>
</template>

<script>
import {mapState} from 'vuex'
export default {
  name: "HomeHeader",
  computed: {
    ...mapState(['city'])
  }
};
</script>

<style scoped>
.header {
  display: flex;
  line-height: 0.86rem;
  color: #fff;
  background-color: #00bcd4;
}
.header-left {
  float: left;
  width: 0.64rem;
  text-align: center;
}
.header-input {
  flex: 1;
  padding-left: 0.2rem;
  margin-top: 0.11rem;
  margin-left: 0.1rem;
  height: 0.64rem;
  line-height: 0.64rem;
  color: #ccc;
  background-color: #fff;
  border-radius: 0.1rem;
}
.header-right {
  float: right;
  padding: 0 .1rem;
  min-width: 1.24rem;
  text-align: center;
  color: #fff;
}
</style>